<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<style>
<!--
#description {
	margin-top: 10%;
}

.box-heading {
	background-color: #8ebda2;
}

#box-heading {
	background-repeat: no repeat;
	height: 44px;
	line-height: 44px;
}

.advice_info {
	widht: 100%;
	min-height: 30px;
	margin-top: 5px;
}

.advice_info>.advice_head {
	height: 38px;
	padding-left: 7px;
	padding-right: 7px;
	border: 1px solid #DBDBDB;
	background: url('catalog/view/theme/mobile/image/box.png') repeat-x;
	-webkit-border-radius: 7px 7px 0px 0px;
	-moz-border-radius: 7px 7px 0px 0px;
	-khtml-border-radius: 7px 7px 0px 0px;
	border-radius: 7px 7px 0px 0px;
}

.advice_info>.advice_content {
	padding: 10px;
	border-left: 1px solid #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 1px solid #CCCCCC;
	min-height: 80px;
	overflow: auto;
}

.advice_info>.advice_reply {
	padding: 10px;
	border-left: 1px solid #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 1px solid #CCCCCC;
	min-height: 40px;
	overflow: hidden;
}

#inside {
	width: 40px;
	height: 100%;
	float: left;
	line-height: 100%;
	position: relative;
}

.input_advice_form {
	position: fixed;
	bottom: 0;
	width: 95%;
	z-index:65536;
	
}
#input_advice_form_container{
	position:fixed;
	bottom:0;
	width: 95%;
	overflow:hidden;
	margin-left:10px;
	z-index:65536;
}
-->
-->
</style>
<script type="text/javascript">
<!--
$(document).ready(function() {
	$('#input_advice_form_container').hide();
	$('#showFormButton').bind('click',function(){
		$('#input_advice_form_container').show();
		$('#showFormButton').hide();
	});

	$('#shouqi').bind('click',function(){
		$('#input_advice_form_container').hide();
		$('#showFormButton').show();
	});
});
//-->
</script>
<div class="input_advice_form">
			<div style="background-color: #0e6389;"
				id="input_advice_form_container">
					<div style="text-align: center;"><input type="button" value="收起" id="shouqi" /></div>
				<form action="<?php echo $insert;?>" method="post">
					<table class="form">
						<tr>
							<td style="color:#ffffff;"><span class="required">*</span>标题</td>
							<td><input type="text" name="title" /></td>
						</tr>
						<tr>
							<td style="color:#ffffff;"><span class="required">*</span> 建议</td>
							<td><textarea name="advice" cols="40" rows="5"></textarea></td>
						</tr>
						<tr>
							<td style="color:#ffffff;text-align:center;" colspan="2"><input type="submit" value="创建" class="button" /></td>
						</tr>
					</table>
				</form>
			</div>
			<div style="border-radius: 7px 7px 7px 7px;background-color:#0e6389">
				<input type="button" id="showFormButton"
					style="width: 100%; height: 30px;" value="创建意见" />
			</div>
		</div>
<div class="box">
	<div id="content">
	<?php echo $content_top; ?>
		<img src="catalog/view/theme/mobile/image/advice.jpg" />
		<?php foreach ($advices as $advice) { ?>
		<div class="advice_info">
			<div class="advice_head">消息头</div>
			<div class="advice_content">
			<?php echo $advice['advice']?>
			</div>
			<?php if($advice['contents']){?>
			<div class="advice_reply">
				<div id="inside">回复：</div>
				<div style="float: left; position: relative;">
				<?php foreach ($advice['contents'] as $index=>$content) { ?>
					<div>
					<?php echo $index.":   ".$content['content']?>
					</div>
					<?php }?>
				</div>
			</div>
			<?php }?>
		</div>
		<?php }?>
		<div style="width:100%;margin-top:10px;">
		<?php if($advices){?>
					<a href="<?php echo $more;?>"  id="moreInfo"
					style="text-align:center;text-decoration:none;display:block;width: 100%; line-height:30px;height: 30px;border:1px solid #AAA;"  >
					下一页
					</a>
					<?php }else{?>
					<a href="<?php echo $before;?>"  id="moreInfo"
					style="text-align:center;text-decoration:none;display:block;width: 100%; line-height:30px;height: 30px;border:1px solid #AAA;"  >
					上一页
					</a>
					<?php }?>
			</div>
	</div>
	<?php echo $content_bottom; ?>
</div>

	<?php echo $footer;?>

